The use of digital devices that can be dynamically attached and removed from a computational device has been growing rapidly. Such devices will be referred herein as removable devices. The USB standard for example has enabled numerous devices to be dynamically connected and removed from a computational device even during the operation of the computational device.
Among these removable devices are mass storage devices such as flash drives, and multimedia players. These devices can be attached to a computational device referred herein as digital appliance and then later be removed. It is of great concern that data integrity of these removable devices is not jeopardized when removed from a digital appliance.
A unit of digital storage such as a computer hard disk, a flash drive or a flash card storage device and other such devices will be referred herein as a digital media storage device, or a media device.
A media device, unlike a floppy diskette or a Compact Disc includes a controller with some RAM, and or ROM or other memory. The reason for these components became necessary as these devices became more complex, requiring managing media transparently to the appliance, for example in order to hide media defects and manage the storage media on a high level.
Due to the growing storage size of these devices, performance such as access speed has been improved for these devices by capabilities such as caching data for media device in digital appliance. This on the one hand improves performance, for example, by caching file table information of media device. This on the other hand creates a problem in cases where these devices are disconnected unexpectedly from a digital appliance. In some cases the last file or files may have not been updated because the file table has not been written back to the device. In other cases more severe problems may occur, such as corruption of the file table.
The problem of surprise removal of hardware has been known and dealt with in the industry, to some extent. For example, Microsoft Corporation has publicized information regarding surprise removal at the link: http://www.microsoft.com/whdc/system/pnppwr/hotadd/XPrem-devs.mspx where a description of both hardware and software malfunctions is described. Essentially, any kind of removable hardware can be removed from a digital appliance without warning to the system, but when storage devices are concerned the problem of loosing data or even corrupting the file table exists. Therefore in Windows XP for example, a refined caching policy for removable storage has been introduced. As a result, in Windows XP the write cache is disabled by default thereby solving many of the problems of previous versions of Windows. This does have an effect on performance. On the other hand even with this cache-disabled policy, the problems of data loss may still occur. For example, if the storage device is removed while a long file is written to the device, or just shortly before its completion. Another example of a problem that may occur is the removal of the storage device while the file table is being updated.
Due to these problems, there exists a requirement for the user of a digital appliance to manually safely remove any removable devices from the computer. In this manner, the digital appliance flushes all cache and data to the storage device and closes connection to that device, so that no further communication is made through this device. This manner is also referred to as “safely remove hardware”.
While this manner of safe removal is logical and solves all problems of surprise removal mentioned above, this step of safely removing a device is cumbersome and not comfortable or intuitive to the user. Even worst, a person may make a mistake and forget to safely remove the device, perhaps due to hurrying up or due to lack of concentration. As a result, some of the files may not be written to the device and in some cases all of the device may become unusable.
There is thus a widely recognized need for an intuitive and simple way to remove removable devices from a digital appliance, and it would be highly advantageous to have such a system devoid of the above limitations.